// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueRouter from 'vue-router'
// import routers from './router/index'
import axios from 'axios'
import ElementUI from 'element-ui'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'element-ui/lib/theme-chalk/index.css'
import "./assets/css/swiper.min.css"
import App from './App'
import Nav from '@/components/B9_Nav'
import Bmain from '@/components/B9_Main'
import Activity from '@/components/B9_activity'
import Actdet from '@/components/B9_actDetail'
import Bproduct from '@/components/B9_pro'
import Bkind1 from '@/components/B9_kind1'
import Bshow from '@/components/B9_show'
import Benjoy from '@/components/B9_enjoy'
//Bactivity Bproduct Benjoy
Vue.use(VueRouter)
Vue.config.productionTip = false
const routes = [
  {
    path: '/',
    name: 'Bmain',
    component: Bmain
  },
  {
    path: '/Nav',
    name: 'Nav',
    component: Nav
  },
  {
    path: '/Activity',
    name: 'Activity',
    component: Activity
  },
  {
    path: '/Actdet',
    name: 'Actdet',
    component: Actdet
  },
  {
    path: '/Bproduct',
    name: 'Bproduct',
    component: Bproduct
  },
  {
    path: '/Bkind1',
    name: 'Bkind1',
    component: Bkind1
  },
  {
    path: '/Bshow',
    name: 'Bshow',
    component: Bshow
  },
  {
    path: '/Benjoy',
    name: 'Benjoy',
    component: Benjoy
  }
];

const router = new VueRouter({routes})
Vue.prototype.$goRoute = function (index) {
  this.$router.push(index)
};
router.afterEach((to,from,next) => {
  window.scrollTo(0,0);
})
Vue.config.productionTip = false;
Vue.prototype.$http=axios;
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'

}).$mount('#app')
Vue.use(ElementUI);
Vue.use(VueAwesomeSwiper);
